<template>
	<!-- #ifdef APP-NVUE -->
	<cell>
		<!-- #endif -->
		<view class="hot-spot-list" @click="clickList">
			<image class="img" :src="news.hotpoint_figure | imgFormat" mode=""></image>
			<view class="content">
				<view class="one">
					<image class="hot" v-if="news.hotpoint_is_top" src="@/static/images/common/hot.svg" mode=""></image>
					<view class="title">
						{{ news.hotpoint_title }}
					</view>
				</view>
				<view class="two">
					<text class="source">{{ news.hotpoint_source }}</text>
					<text>{{ news.hotpoint_publish_time | timeFormat('YYYY-MM-DD HH:mm') }}</text>
				</view>
			</view>
		</view>
	<!-- #ifdef APP-NVUE -->
	</cell>
	<!-- #endif -->
</template>

<script>
	export default {
		name: 'HotSpotList',
		props: {
			news: Object
		},
		methods: {
			clickList() {
				this.$emit('clickList', this.news)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.hot-spot-list {
		display: flex;
		align-items: center;
		padding: 10px 0;
		width: 650rpx;
		
		border-bottom: 1px solid #F8F8F8;
		
		box-sizing: border-box;
		.img {
			width: 150rpx;
			height: 50px;
			margin-right: 20rpx;
		}
		.content {
			// flex: 1;
			width: 480rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-around;
			
			height: 50px;
			.one {
				display: flex;
				align-items: center;
				.hot {
					width: 28rpx;
					height: 28rpx;
					margin-right: 10rpx;
				}
				.title {
					flex: 1;
					
					font-size: 14px;
					
					color: $uni-text-color;
					
					overflow: hidden;/*超出部分隐藏*/
					text-overflow:ellipsis;/* 超出部分显示省略号 */
					white-space: nowrap;/*规定段落中的文本不进行换行 */
				}
			}
			.two {
				display: flex;
				font-size: 12px;
				
				color: #999999;
				.source {
					display: inline-block;
					margin-right: 20rpx;
					max-width: 7em;
					
					overflow: hidden;/*超出部分隐藏*/
					text-overflow:ellipsis;/* 超出部分显示省略号 */
					white-space: nowrap;/*规定段落中的文本不进行换行 */
				}
			}
		}
	}
</style>
